﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入你想寄存的是宠物：1、猫,2、燕子,3、老鹰,4、老虎");
            int key = int.Parse(Console.ReadLine());
            Animals a;
            switch (key)
            {
                case 1:
                    a = new Cat();
                    break;
                case 2:
                    a = new Swallow();
                    break;
                case 3:
                    a = new Eagle();
                    break;
                case 4:
                    a = new Tiger();
                    break;
                default:
                    Console.WriteLine("请输入正确的序号");
                    a = new Tiger();
                    break;
            }
            Addanimals add = new Addanimals();
            add.ConsignAnimal(a);
        }
    }
}
